Page({
    data: {
        fontSize: 30,
    },

    onReady() {
        console.warn('')
        
        wx.onWindowResize(res => {
            console.log('onWindowResize', res)
        })

        this.createMediaQueryObserver().observe({
            minWidth: 600,
            maxWidth: 1000,
        }, matches => {
            console.log('media query observer: ', matches)
        })
    },

    addFontSize() {
        this.setData({
            fontSize: this.data.fontSize + 10,
        })
    },
})